package com.ssb.admin.common.exception;


import com.ssb.admin.constant.ResponseStatus;

public class ApiException extends RuntimeException {
	private static final long serialVersionUID = 1L;

	private Integer code;

	public ApiException(String msg) {
		super(msg);
	}

	public ApiException(String msg, Throwable e) {
		super(msg, e);
	}

	public ApiException(String msg, Integer code) {
		super(msg);
		this.code = code;
	}

	public ApiException(String msg, Integer code, Throwable e) {
		super(msg, e);
		this.code = code;
	}
	public ApiException(ResponseStatus res){
		super(res.getMessage());
		this.code = res.value();
	}


	public int getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}
	
	
}
